package movee.io.cmd.service;

import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;

/**
 *
 *
 * @author movee
 */
public class CmdServiceExecuteFeignConfig {

    /**
     * fegin 拦截器
     * @return
     */
    @Bean
    public RequestInterceptor requestInterceptor() {
        return requestTemplate -> {
            requestTemplate.header("Authorization", CmdServiceConfig.token);
            requestTemplate.header("Content-Type", "application/json");
            requestTemplate.header("Accept", "application/json");
        };
    }

}
